#!/usr/bin/env python
#-*- coding:utf-8 -*-
'''
   reduce_demo_11-9.py
   autor wenzhui
'''
num = [1,2,3,4,5,6]

def my_sum(x,y):
    return x+y
def average(num):
    total = reduce(my_sum, num)
    return round(float(total)/len(num),2)

print average(num) 
